home *** CD-ROM | disk | FTP | other *** search
-
- #include <WindowMgr.h>
- #include <ListMgr.h>
- #include <OSUtil.h>
- #include <EventMgr.h>
-
- #include "MacCalc.h"
- #include "SheetHndlg.h"
- #include "CalcData.h"
-
- void CreateMenus( void ) ;
-
- int DoInit( )
- {
-
- /* initialize all the MacIntosh Managers */
- InitGraf( ( Ptr)&thePort ) ; /* initialize quickdraw */
- InitFonts( ) ; /* initialize the font manager */
- InitWindows( ) ; /* initialize the window manager */
- InitCursor( ) ; /* initialize the cursor */
- InitMenus( ) ; /* initialize the menu manager */
- TEInit( ) ; /* initialize the text edit manager */
- InitDialogs( NULL ) ; /* initialize the dialog manager */
-
- /* Flush events */
-
- FlushEvents( everyEvent, 0 ) ;
-
- /* Get curr screen size */
- curr_screen = screenBits.bounds ;
- SetRect( &minmax_size, 207, 77, 447, 159 ) ;
-
- /* Expand the heap to the maximum and allocate more masters blocks */
- MaxApplZone( ) ;
- MoreMasters( ) ;
- MoreMasters( ) ;
- MoreMasters( ) ;
- MoreMasters( ) ;
- MoreMasters( ) ;
-
- CreateMenus( ) ;
-
- OpenNewSpreadsheet( "\pUntitled" ) ;
- }
- void CreateMenus( )
- {
- MenuHandle menu ;
-
- menu = GetMenu( 1 ) ;
- AddResMenu( menu, 'DRVR' ) ;
- InsertMenu( menu, 0 ) ;
- InsertMenu( GetMenu( 256 ), 0 ) ;
- InsertMenu( GetMenu( 257 ), 0 ) ;
- DrawMenuBar( ) ;
- }